package co.fitstart.entity.market;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import co.fitstart.entity.user.User;

/**
 * 用户反馈
 * 
 * @author dan
 *
 */
@Entity
@Table(name = "market_feedback")
@JsonIgnoreProperties(value={"hibernate_lazy_initializer","handler","fieldHandler"})
public class MarketFeedback {
    
    @Id
    @GeneratedValue
    private Long id;
    
    private Date createTime;
    
    /** 反馈 */
    @Type(type = "text")
    private String description;
    
    /** 用户 openid */
    private String userOpenid;
    
    /**
     * The default constructor
     */
    public MarketFeedback() {
        
    }
    
    /**
     * 
     * @param description
     * @param user
     */
    public MarketFeedback(String description, User user) {
        this.createTime = new Date();
        this.description = description;
        this.userOpenid = user.getOpenid();
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the userOpenid
     */
    public String getUserOpenid() {
        return userOpenid;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @param userOpenid the userOpenid to set
     */
    public void setUserOpenid(String userOpenid) {
        this.userOpenid = userOpenid;
    }

}
